package 多线程.线程状态.New;

public class Main {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
           for(int i = 0;i < 10;i++){
               System.out.println(i);
               try {
                   Thread.sleep(1000);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
        });
        int i = 0;
        while(true){
            try {
                i++;
                System.out.println(i);
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
    }
}
